from django.db import models

# Create your models here.
class BookList(models.Model):
    name = models.CharField(max_length=32, verbose_name="书名")
    author = models.CharField(max_length=32, verbose_name="作者")
    price = models.DecimalField(max_digits=5, decimal_places=2, verbose_name="价格")
    pub_date = models.DateField(verbose_name="出版时间")
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    class Meta:
         ordering = ['-create_time'] # 默认排序字段--降序排列